package band.wukong.practice.webservice.kh.sample06.nongen;

import band.wukong.practice.webservice.kh.sample06.CalcService;
import band.wukong.practice.webservice.kh.sample06.CalcServiceImplService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

/**
 * wsimport -d d:/ -encoding utf-8 -keep http://localhost:9000/wkp/webservice/kh/sample06?wsdl
 *
 * @author wukong(wukonggg@139.com)
 */
public class ClientTest {

    private static final Logger logger = LoggerFactory.getLogger(ClientTest.class);

    private CalcService port;

    @BeforeClass
    public void init() {
        CalcServiceImplService service = new CalcServiceImplService();
        port = service.getCalcServiceImplPort();
    }

    @Test
    public void add() {
        Assert.assertEquals(port.add(1, 2), 3);
    }

    @Test
    public void divide() {
        Assert.assertEquals(port.divide(4, 2), 2);
    }


}
